<!--
 * @Author: your name
 * @Date: 2021-04-20 16:34:27
 * @LastEditTime: 2021-04-21 10:39:49
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue03-demo\src\views\HomeChild.vue
-->
<template>
  <div>
    <div>home Child {{propsName}}</div>
    <button type="button" @click="clickHandler">Minus</button>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
  props: ['propsName'],
  emits: ['minus-event'],
  setup (props, { emit, attrs }) {
    console.log('attrs :>> ', attrs)
    console.log('props :>> ', props)
    const clickHandler = () => {
      emit('minus-event')
    }
    return {
      clickHandler
    }
  }
})
</script>

<style>

</style>
